Skip to content

Conversation

@psriramsnc
Copy link
Collaborator

@psriramsnc psriramsnc commented Oct 27, 2025

🐞 Bug Fix: Fix Async test cases

✨ Summary

This PR refactors and enhances unit tests for all models and clients by improving async test handling using asyncio.run() and restructuring test methods for better readability and consistency.

Key improvements:

  • 🔄 Ensured consistent asyncio.run() usage across all test cases.
  • ✅ Improved mock setup (AsyncMock, MagicMock) for better async behavior simulation.
  • 🧩 Enhanced coverage for different response scenarios including success, HTTP errors, rate limits, and server errors.

🧭 Impacted Features

Updated Test cases to support Async tests.


🧪 How to Test

  • Run

    make test-verbose
  • Verify that all tests pass successfully ✅

  • Confirm no warnings about un-awaited coroutines 🌀


Screenshots (if applicable)

NA

Checklist

  • Lint fixes and unit testing done
  • End to end task testing
  • Documentation updated

Notes

This update improves test isolation and async reliability. No User facing changes were made.

@psriramsnc psriramsnc self-assigned this Oct 28, 2025
@psriramsnc psriramsnc added the bug Something isn't working label Oct 28, 2025
@psriramsnc psriramsnc marked this pull request as ready for review October 28, 2025 06:08
@psriramsnc psriramsnc requested a review from a team as a code owner October 28, 2025 06:08
Copy link
Collaborator

@amitsnow amitsnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Copy link
Member

@zephyrzilla zephyrzilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@psriramsnc psriramsnc merged commit 0aae8be into main Oct 28, 2025
12 checks passed
@psriramsnc psriramsnc deleted the scratch/fix_async_tests branch October 28, 2025 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants